﻿using System;
using System.Collections.Generic;
using System.Text;

namespace X3dTest
{
    public class X3dInterfaceObject : IX3DObjectString, IObjectChildren
    {
        public string  toString()
        {
            return X3DString .toString (this );
        }

        public string toX3dFile()
        {
            return X3DString.getX3dAll(this);
        }

        private List<Object> Children;

        public X3dInterfaceObject()
        {
            this.children = new List<object>();
        }

        public List<Object> children
        {
            get { return Children; }
            set { Children = value; }
        }
    
        public void addChildren(object o)
        {
            this.children.Add(o);
        }
        public void removeChildren(object o)
        {
            this.children.Remove(o);
        }

        public virtual string  getAttrs()
        {
            return X3DString.getX3dAttribute(this);//这样父类可以获取子类属性
        }
        public virtual void setAttrs(string attrs)
        {

        }
    }
}
